package 传智播客_黑马.java高级.函数式.函数式接口;

import java.util.function.Predicate;

public class 常用predicate {
    //test
    public static boolean mayBe(String str,Predicate<String> pre){
        return pre.test(str);
    }

    public static void main(String[] args) {
        System.out.println(mayBe("这是真的", (s) -> {
            System.out.println(s);
            return true;
        }));
    }
}
